drop table if exists jms_ods.tab_take_delivery ;
create EXTERNAL TABLE if not exists jms_ods.tab_take_delivery(
ID        bigint        comment   '主键id'   , --NUMBER(21)
BOOKING_SPACE_NO        bigint        comment   '订舱号'   , --NUMBER(11)
LANDING_TIME        timestamp        comment   '实际落地时间'   , --DATE
GOODS_QUANTITY        int        comment   '实际到件件数'   , --NUMBER(6)
GOODS_WEIGHT        double        comment   '实际到件重量'   , --NUMBER(8,2)
DESTINATION_CENTER_ID        bigint        comment   '目的地转运中心id'   , --NUMBER(11)
DESTINATION_CENTER_CODE        string        comment   ''   , --NVARCHAR2(30)
DESTINATION_CENTER_NAME        string        comment   '目的地转运中心name'   , --NVARCHAR2(60)
TAKE_DELIVERY_TIME        timestamp        comment   '提货上报时间'   , --DATE
REPORT_PERSON        string        comment   '提货上报人'   , --NVARCHAR2(15)
INFORMATION        string        comment   '异常情况'  ,  --NVARCHAR2(100)
SEND_GOODS_REPORT_ID  bigint    comment     '发货上报记录表tab_send_goods_report关联主键id'   -- number(21)
)
    COMMENT  '提货上报'
    PARTITIONED BY (dt STRING COMMENT '时间分区')
    STORED AS PARQUET
    LOCATION '/dw/hive/jms_ods.db/external/tab_take_delivery'
    TBLPROPERTIES (
        'discover.partitions' = 'false',
        'parquet.column.index.access' = 'true'
        );

msck repair table jms_ods.tab_take_delivery ;